package com.security.controller;

import com.security.mapper.MemberMapper;
import com.security.service.AppInfoIService;
import com.security.tools.RedisUtil;
import com.security.vo.RestfulDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Package: com.security.controller
 * Description：受保护的接口
 * Author: huangjian
 * Date:  2020/9/16 14:05
 * Modified By:
 * @author huangjian
 */
@RequestMapping("/open")
@RestController
public class OpenController {
    @Resource
    private RedisUtil redisUtil;
    @Resource
    private AppInfoIService appInfoIService;
    @Resource
    private MemberMapper memberMapper;
    @GetMapping("/getUserInfo")
    public RestfulDTO getUserInfo(Integer userId){
        return RestfulDTO.success(memberMapper.selectById(userId));
    }
}
